//
//  UIImage(KsiFunction).h
//
//  Created by cnksi on 11-8-10.
//  Copyright ModunZhang 2011年  All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum {
    KsiThumbImageModeWidthFirst, //宽度优先
    KsiThumbImageModeHeightFirst,//高度优先
    KsiThumbImageModePortion,//截取部分，只取最中间的部分
    KsiThumbImageModeFull,//缩放，可能会让图像变形
    KsiThumbImageModeResize,//根据高宽比等比缩放，缺失部分Clear Color 补充
    KsiThumbImageModeAuto,//根据高宽比等比缩放，在让图片满屏的情况下，放弃一部分高或者宽  
} KsiThumbImageMode;

@interface UIImage (KsiFunction)

- (id)initWithContentsOfResolutionIndependentFile:(NSString *)path;

+ (UIImage*)imageWithContentsOfResolutionIndependentFile:(NSString *)path;

+ (UIImage *)KsiThumbImageWithFullImageName:(NSString *)imageName withSize:(CGSize)size withMode:(KsiThumbImageMode)mode;
+ (UIImage *)imageWithColor:(UIColor *)color andSize:(CGSize)size;
@end
